package com.cloudfun.campusshare.common.model.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.groups.Default;

/**
 * @author linyangping
 * @Title: 应用中心vo
 * @date 2019/11/6 下午2:27
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "应用信息")
public class AppVO {

    @ApiModelProperty(value = "id")
    private String appId;

    @ApiModelProperty(value = "应用名称")
    @NotEmpty(message = "应用名称不能为空", groups = {Submit.class})
    @Length(max = 10, message = "名称过长，限制10个字")
    private String name;

    @ApiModelProperty(value = "应用简介")
    @Length(max = 200, message = "应用简介限制200个字")
    private String description;

    @ApiModelProperty(value = "版本号")
    @NotEmpty(message = "应用版本不能为空", groups = {Submit.class})
    @Length(max = 10, message = "应用版本限制10个字")
    private String appVersion;

    @ApiModelProperty(value = "版本描述")
    @Length(max = 200, message = "版本简介限制200个字")
    private String versionDesc;

    public static interface Submit extends Default {
    }

}
